
<form class="form-horizontal"  th:action="@{/roles}" method="post" id="roleForm" th:object="${roleModel.role}">
    <input type="hidden" name="id" th:value="*{id}"/>
    <div class="form-group">
        <label for="name" class="col-sm-2 control-label">角色名</label>
        <div class="col-sm-10">
            <input type="text" class="form-control" id="name" name="name" th:value="*{name}" placeholder="角色名" />
        </div>
    </div>
    <div class="form-group">
        <label for="name" class="col-sm-2 control-label">权限管理</label>
        <div data-th-fragment="treeView"  class="col-sm-offset-2">
            <div class="zTreeDemoBackground">
                <ul id="treeDemo" class="ztree"></ul>
            </div>
        </div>
        <input type="hidden" id="menuIds" name="menuIds" th:value="*{menuIds}"/>
    </div>
</form>
<div class="form-group">
    <div class="col-sm-offset-2 col-sm-10">
        <button  class="btn btn-default" id="submitEdit" onclick="Role.save()"><span class="glyphicon glyphicon-ok-sign"></span>提交</button>
        <button  class="btn btn-default" id="cancel" onclick="Role.cancel()"><span class="glyphicon glyphicon-remove-sign"></span>取消</button>
    </div>
</div>

<script src="../../js/jquery.ztree.all.js" th:src="@{/js/jquery.ztree.all.js}"></script>
<script src="../../js/system/roleTree.js" th:src="@{/js/system/roleTree.js}"></script>
<script src="../../js/system/role.js" th:src="@{/js/system/role.js}"></script>
